import { createApp } from "vue";
import { createPinia } from "pinia";
import vCharts from "./components/vecharts/index.vue";
import test from "./plugin/test";
import hasPermission from "./directive/hasPermission.js"
import App from "./App.vue";
import router from "./router";

import "./assets/main.css";

const app = createApp(App);

// vue 注册全局组件
app.component('v-charts',vCharts)

// 自定义指令
app.directive('has',hasPermission)

app.use(createPinia());
// 注册插件
app.use(test,{
    val:'main.js配置文件'
});
app.use(router);

app.mount("#app");
